package com.gallop.mq.core.dispatcher;

import lombok.Builder;
import lombok.Data;

import java.util.function.BiConsumer;

@Data
@Builder
public class DispatchContext {

    private String topic;
    private Object message;
    private String group;
    private String replyTo;
    private String correlationId;
    private RpcResponse rpcResponse;

    @FunctionalInterface
    public interface RpcResponse {
        void accept(String correlationId, String replyTo, Object message);
    }
}
